﻿<MDCard Href="@("lotteries/index/"+Model.Id)" Class="h-100" Style="display: flex; flex-direction: column; justify-content: space-between;">
    <div class="">
        <div style="display:flex;">
            <img class="img-fluid" src="@Model.MainPicture">
        </div>
        <div class="pa-3">
            <header style=" display: flex; align-items: center;" class="mb-2">
                @if (DateTime.Now.ToCstTime() < Model.BeginTime)
                {
                    <CnGalWebSite.Shared.MasaComponent.PC.Home.Cards.Shared.IconChip Text="未开始" />
                }
                else if (DateTime.Now.ToCstTime() > Model.EndTime)
                {
                    <CnGalWebSite.Shared.MasaComponent.PC.Home.Cards.Shared.IconChip Text="已结束" />
                }
                else
                {
                    <CnGalWebSite.Shared.MasaComponent.PC.Home.Cards.Shared.IconChip Text="正在进行" />
                }

                <div class="fw-bold mb-0 text-truncate-2 title-large">@Model.Name</div>
            </header>
            <span class=" text-truncate-3 label-large">
                @Model.BriefIntroduction
            </span>

        </div>
    </div>
</MDCard>


@code {
    [Parameter]
    public LotteryCardViewModel Model { get; set; }

}
